import { ApiProperty } from "@nestjs/swagger";
import { BaseEntity, PaginatedResult } from "src/common/entities/entities";
import { Column, Entity } from "typeorm";

@Entity('seting')
export class SetingEntity extends BaseEntity {
    /** code */
    @ApiProperty({ example: 'code', description: 'code' })
    @Column({
        type: 'varchar',
        length: 100,
        comment: 'code',
    })
    code: string;
    /** 保存内容 */
    @ApiProperty({ example: 'data', description: '保存内容' })
    @Column({
        type: 'json',
        comment: '保存内容',
        nullable: true
    })
    data: string;
}

export class SetingResult extends PaginatedResult {
    @ApiProperty({ example: 'data', description: 'data' })
    data: SetingEntity;
}